import { useStore } from '@/store';

export function userPermission(pageName: string, handleName: string) {
  const store = useStore();
  const verifyPermission = `system:${pageName}:${handleName}`;
  const permissions = store.state.login.userPermission;
  return !!permissions.find((item) => item == verifyPermission);
}
